import QtQuick 1.0

Item {
    Image {
        source: "res/img/life_background.png"
        scale: 0.5

        x: 500
        y: 0

        Image {
            id: ouroboros1Missing

            visible: (playerContext.collectedItems == 0)

            anchors.left: parent.left
            anchors.top: parent.top
            anchors.leftMargin: 35
            anchors.topMargin: 5

            source : "res/img/ouroboros_missing.png"
        }

        Image {
            id: ouroboros1Collected

            visible: (playerContext.collectedItems > 0)

            anchors.left: parent.left
            anchors.top: parent.top
            anchors.leftMargin: 35
            anchors.topMargin: 5

            source : "res/img/ouroboros_collected.png"
        }

        Image {
            id: ouroboros2Missing
            visible: (playerContext.collectedItems < 2)
            anchors.centerIn: parent
            source : "res/img/ouroboros_missing.png"
        }

        Image {
            id: ouroboros2Collected
            visible: (playerContext.collectedItems >= 2)
            anchors.centerIn: parent
            source : "res/img/ouroboros_collected.png"
        }

        Image {
            id: ouroboros3Missing

            visible: (playerContext.collectedItems < 3)
            anchors.right: parent.right
            anchors.top: parent.top
            anchors.rightMargin: 35
            anchors.topMargin: 5

            source : "res/img/ouroboros_missing.png"
        }

        Image {
            id: ouroboros3Collected
            visible: (playerContext.collectedItems >= 3)
            anchors.right: parent.right
            anchors.top: parent.top
            anchors.rightMargin: 35
            anchors.topMargin: 5

            source : "res/img/ouroboros_collected.png"
        }
    }

    Item {
        //colocar um background

        Image {
            id: lifeGreen
            source: "res/img/life_green.png"
            scale: 0.5
            visible: (playerContext.health >= playerContext.totalHealth * 0.6)
        }

        Image {
            id: lifeYellow
            source: "res/img/life_yellow.png"
            scale: 0.5
            visible: (playerContext.health < playerContext.totalHealth * 0.6 && playerContext.health >= playerContext.totalHealth * 0.2)
        }

        Image {
            id: lifeRed
            source: "res/img/life_red.png"
            scale: 0.5
            visible: (playerContext.health < playerContext.totalHealth * 0.2)
        }
    }
}
